#include <iostream>
#include <string>
#include "Dictionary.h"
#include "Menu.h"
using namespace std;

void Func()
{
	int flag = 0;
	Dictionary d;
	string word;
	char ch;
	do
	{
		Menu();
		char choice;
		cout << "\n请输入您的选项： ";
		cin >> choice;

		switch(choice)
		{
			case '1':
				system("CLS");
				cout << "请输入您要查找的单词："; 
				cin >> word;
				d.Search(word);
				break;
			case '2': 
				system("CLS");
				cout << "请输入您要添加的单词： ";
				cin >> word;
				d.add(word);
				break;
			case '3':
				system("CLS");
				d.Delete();
				break;
			case '4':
				system("CLS");
				d.Show(ch);
				system("pause");
				break;
			case '5':
				flag = 1;
				break;
			default:
				break;
		}
		
	}while(flag != 1);
}